package com.awesome.javademo.algorithm.activities;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.awesome.common.util.log.ShowLogUtil;
import com.awesome.javademo.R;
import com.awesome.javademo.algorithm.solution.SolutionArray;

public class ArrayActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_array);
//        int[] array = new int[]{1,3,5,6};
//        int count = SolutionArray.removeDuplicate(array);
//        for (int i = 0; i < count; i++) {
//            ShowLogUtil.info(array[i]);
//        }
//        int count = SolutionArray.searchInsert(array,5);
//        ShowLogUtil.info(count);

//        int[][] doubleArray = new int[][]{{1,3},{4,5}};
//        int[][] merge = SolutionArray.merge(doubleArray);
//        for (int i = 0; i < merge.length; i++) {
//            ShowLogUtil.info("===========");
//            for (int j = 0; j < merge[i].length; j++) {
//                ShowLogUtil.info(merge[i][j]);
//            }
//            ShowLogUtil.info("===========");
//        }
        int[][] matrix = new int[][]{{1,2,3},{4,5,6},{7,8,9}};
        SolutionArray.rotateDoubleArray2(matrix);

    }
}